Technical Q&As


GXPD 38 - Setting A Default Papertype for GX Printers (8-Apr-96)


Important for all Apple Printing and Graphics Developers:

The information in this Technical Q & A is still relevant up to and including Mac OS 7.6 with QuickDraw GX 1.1.5. Beginning with the release of Mac OS 8.0, however, Apple plans to deliver a system which incorporates QuickDraw GX graphics and typography only. QuickDraw GX printer drivers and GX printing extensions will not be supported in Mac OS 8.0 or in future Mac OS releases. Apple's goal is to simplify the user experience of printing by unifying the Macintosh graphic and printing architectures and standardizing on the classic Printing Manager.

For details on Apple's official announcement, refer to </dev/technotes/gxchange.html>

Q My driver has a 'ptyp' of "A4 portrait" as the default papertype (via the isDefaultPaperType flag). When a user chooses my driver from PageSetup dialog, "A4" is selected as the default papertype in the desktop printer, though my driver has no 'ptyp' named "A4".

How can I set my own paper type ("A4 portrait") as the default?

A Unfortunately, this is a bug in QuickDraw GX.

GX internally adds the standard papertypes (e.g., A4, US Letter, etc,) to your driver. The bug is that GX thinks it is finding a better fit for the current page dimensions than the assigned A4 portrait papertype. It then defaults to GX's internal A4 papertype. In other words, the paper matching code is working incorrectly.

If you are defaulting to a non-standard papertype, such as Letterhead, Stationery or Three-hole Punch, the best workaround is to remove that papertype from the Extensions folder.

If you are defaulting to another papertype, then the easiest thing you can do is to open your driver with ResEdit and remove or edit the 'ptyp' resource for the papertype that is incorrectly matching (open up the resource in ResEdit, and you'll see the papertype name embedded in the data).

This is the only way to correct the problem at this time. It is not very user-friendly, but it will force the driver to default to the correct papertype.

Technical Q&As
Previous Question | Contents | Next Question